#ifndef GT98XX_TEST_INFRASTRUCTURE_H_
#define GT98XX_TEST_INFRASTRUCTURE_H_

#include "gt98xx.h"
#include "gt98xx_drv_conf.h"
//#include "test_error_code.h"
//#include "test_ins.h"
#include "sys.h"

typedef struct tagAssertTypedef {
  uint8_t* file;
  uint32_t line;
} AssertTypedef;

#define TEST_ASSERT(expr)                 ((expr) ? (void)0U : AssertFailed((uint8_t*)__FILE__, __LINE__))
#define CHECK_PARM(expr, error_id)        if (!(expr)) return error_id

extern AssertTypedef g_assert;

__NO_RETURN void AssertFailed(uint8_t* file, uint32_t line);

uint8_t GetChecksum(const uint8_t* buffer, uint32_t length);
uint32_t BytesToWord(const uint8_t* bytes_addr);

#endif /* GT98XX_TEST_INFRASTRUCTURE_H_ */
